function img =drawSVGtoImage(source_name)
p_file=fopen(source_name);
if p_file==-1
    fprintf('falied to load image %s',source_name);    
end
text = fgetl(p_file);
data= sscanf(text,'%f, ');
width = data(1); height = data(2);

img = zeros(height,width,'uint8');
while(~feof(p_file))
    text = fgetl(p_file);
    data = sscanf(text,'%f, ');
    switch data(1)
        case 1
          mask=lineMask([height width],[data(3) data(2)], [data(5) data(4)],1);
          img = max(img, mask);
        otherwise
            frpintf('unkonw shape type found!\n');
    end
end
fclose(p_file);

end